#pragma once

#include <string>



namespace Gw2API{

#ifndef GW2API_C_STRUCTS

#define EVT_ACTIVE 0
#define EVT_SUCCESS 1
#define EVT_FAIL 2
#define EVT_WARMUP 3
#define EVT_PREPARATION 4

#endif

//possible event-states := [active, success, fail, warmup, preparation, default]
enum state{active, success, fail, warmup, preparation, undef=-1};

class Event
{
public:
	//Event Consturctor, usage: (&id_str, &name_str, &state_str) or any valid string ptr, on default set to 0
	Event(std::string *id=0, std::string *name=0, std::string *state=0);
	~Event(void);

	//returns a strPtr to the event name
	std::string* getName(){return &event_name;}

	//returns a strPtr to the event id
	std::string* getId(){return &event_id;}

	//returns a strPtr to the map_id
	std::string* getMap(){return &map_id;}

	//returns the current event-state [-1..3], check with EVT_* macros
	int getState(){return state;}

	//sets the current state, is set to undefined on default
	void setState(enum state state=undef);

	//updates the state by the given strPtr returns true if state is not set to undef
	bool updateState(std::string*);
	
private:
	enum state state;
	std::string event_name, event_id, map_id;
};
};
